<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>角色管理</title>
		<link rel="stylesheet" href="../css/common.css" type="text/css" />
	</head>
	<body>
		<div id="man_zone" align="left">
		<center><c:out value="${message}" /></center>
<form id="form1" name="form1" method="post" action="role.do?method=query">
  <table class="table_qry" border="0" cellpadding="3" cellspacing="1">
   <tr>
        <td>角色名称</td>
        <td>
		<input type="text" name="roleName" id="roleName" value='<c:out value="${roleName}"/>' />
		</td>
		 <td>
		 <input type="hidden" name="prv" value="query" /> 
		<input type="submit" name="Submit"   value="查询" />
		</td>
		<td>
		<c:if test="${prv.insert != null}">
		<input name="button" type="button" class="STYLE2" value="添加" onclick="javascript:location.href='role.do?method=roleAdd&prv=insert';"  />
		</c:if>
		</td>
		</tr>
</table>
<table class="table_style" width="99%" border="0" align="center"
	cellpadding="3" cellspacing="1">
	<tr>
	<th>角色名称</th>
    <th>操作</th>
    </tr>
    <c:forEach items="${bean.datas}" var="item" varStatus="status">
    <tr>
      <td class="table_text"><c:out value="${item.roleName}"/></td>
      <td class="table_text">
      <c:if test="${prv.update != null}">
      <a  href="#" onclick="javascript:location.href='role.do?method=searchById&prv=update&id=<c:out value="${item.roleId}"/>';">修改</a>
      </c:if>
      <c:if test="${prv.delete != null}">
      <a  href="#" onclick="javascript:if (confirm('确认删除吗?')) {location.href='role.do?method=delete&prv=delete&id=<c:out value="${item.roleId}"/>'};">删除</a>
      </c:if>
      <c:if test="${prv.person != null}">
      <a  href="#" onclick="javascript:location.href='role.do?method=roleuser&prv=person&roleId=<c:out value="${item.roleId}"/>'">人员表</a> 
      </c:if>
      </td>
    </tr>
    </c:forEach>
    <tr>
    <td align="left" colspan="4" height="35" bgcolor="#FFFFFF" >
    <!-- 页面隐藏域信息 -->
	<c:out value="${bean.fliper.formathtml}" escapeXml="false"/>
	<!-- 分页显示信息 -->
	 <c:out value="${bean.footerhtml}" escapeXml="false"/>
	 </td>
    </tr>
  </table>
</div>
	</body>
	</form>
</html>